#pragma once
#include <dsp/types.h>

inline const dsp::complex_t CHROMA_FIR[] = {
    {-0.000005461290583903, -0.000011336784355655},
    { 0.000020060944485414,  0.000009851315045203},
    {-0.000034177222729438,  0.000007245841504981},
    { 0.000027694034878705, -0.000033114740542635},
    {-0.000001217597841648,  0.000039141482370942},
    {-0.000008324593371228, -0.000011315001355976},
    {-0.000038085228233509, -0.000010585909953738},
    { 0.000114833396071141, -0.000047778708840608},
    {-0.000115428390169113,  0.000205816198882814},
    {-0.000055467806072871, -0.000356692479491626},
    { 0.000349316846854190,  0.000326162940234916},
    {-0.000558465829929114, -0.000048001521408724},
    { 0.000488176200631416, -0.000319593757302922},
    {-0.000169437838021935,  0.000501610900725908},
    {-0.000131793335799502, -0.000373003580727547},
    { 0.000166817395492786,  0.000105930895534474},
    { 0.000030499908326112, -0.000003048682668943},
    {-0.000174999505027919,  0.000168008090089458},
    { 0.000054431163395030, -0.000385174790951272},
    { 0.000215876012859739,  0.000372695852521209},
    {-0.000325534912280750, -0.000130173041693966},
    { 0.000154951430569290, -0.000045395998708328},
    { 0.000054324657659002, -0.000076028700470037},
    { 0.000015664427565764,  0.000348002612845696},
    {-0.000345943017888332, -0.000402175417043307},
    { 0.000568731727879741,  0.000112347863435682},
    {-0.000416485880859085,  0.000211750352828909},
    { 0.000087462353623011, -0.000188197153014309},
    {-0.000032082305030264, -0.000136804226080664},
    { 0.000379089999045955,  0.000303466839685362},
    {-0.000726760198519770, -0.000007022279302816},
    { 0.000619888661818195, -0.000476871323359809},
    {-0.000151885493742993,  0.000595641190573181},
    {-0.000100626407015494, -0.000227947144491108},
    {-0.000201935458823941, -0.000107628631934340},
    { 0.000680260922139900, -0.000120771182888852},
    {-0.000666108629277491,  0.000744775901128973},
    { 0.000067236591919755, -0.001044125966364420},
    { 0.000447037274751822,  0.000651912509450913},
    {-0.000262675893448686, -0.000082499729563337},
    {-0.000349821460486320,  0.000132102793530818},
    { 0.000507024815168287, -0.000837598610490618},
    { 0.000163814255478652,  0.001346530693477834},
    {-0.000970457632383793, -0.000968411010101160},
    { 0.000974834882891140,  0.000116507082762032},
    {-0.000225464280571542,  0.000137131865995708},
    {-0.000211542240694642,  0.000563783548428947},
    {-0.000414412310798766, -0.001309793399193736},
    { 0.001497010004594478,  0.001021907858926259},
    {-0.001752019159639658,  0.000116536066154131},
    { 0.000872822027879430, -0.000783952720205569},
    {-0.000032439446797970,  0.000184988059956734},
    { 0.000446259382722895,  0.000833040920509238},
    {-0.001741577737284306, -0.000764423771425237},
    { 0.002306569133792772, -0.000593352416441601},
    {-0.001336084746214192,  0.001744394557524181},
    {-0.000015810020735495, -0.001342809547658260},
    { 0.000007636494885364,  0.000009498318627546},
    { 0.001403876768349702,  0.000326101441888391},
    {-0.002351020828600226,  0.001098649819278302},
    { 0.001389314639579544, -0.002746943712072884},
    { 0.000526319899588909,  0.002635084366837732},
    {-0.001109526585744687, -0.000950323796527721},
    {-0.000307792427984886, -0.000013203419520794},
    { 0.001737955094951111, -0.001247368808692850},
    {-0.000974502437588420,  0.003352512117661680},
    {-0.001462571137390936, -0.003635296917435679},
    { 0.002783459090201693,  0.001604420226187745},
    {-0.001471518558760170,  0.000211117948702137},
    {-0.000575340825070194,  0.000601820846100026},
    { 0.000302090333345692, -0.003088058972305493},
    { 0.002496092353182990,  0.003912508340989065},
    {-0.004645661091012423, -0.001630427298020200},
    { 0.003556824805628799, -0.001209822327859352},
    {-0.000744999556260706,  0.001143238699138109},
    { 0.000144278726929409,  0.001638049051599065},
    {-0.003025291044450178, -0.003226370992887968},
    { 0.006047866290490120,  0.000927406808799887},
    {-0.005338456415106141,  0.003008811999350399},
    { 0.001642959659014839, -0.003972384205231079},
    { 0.000273874932822212,  0.000977326273749033},
    { 0.002315022846573390,  0.001695671268241410},
    {-0.006240953957978884,  0.000207330368698293},
    { 0.006164252120861735, -0.005177351717451013},
    {-0.001560310257561104,  0.007437030759707700},
    {-0.002131333814462852, -0.004317129694157112},
    { 0.000280518918541908,  0.000134405998842553},
    { 0.004612116481180659, -0.001024468120657814},
    {-0.005599300279638699,  0.006828277067771868},
    { 0.000228879728552504, -0.010675998154712657},
    { 0.005692081512980654,  0.007582243186569848},
    {-0.005100500569859509, -0.001364751685737153},
    {-0.000902490398043454,  0.000385770160220703},
    { 0.003673858819546609, -0.006701685283451640},
    { 0.002079056046131593,  0.012568579063417429},
    {-0.010730008156911677, -0.009826454574016218},
    { 0.012092401380903161,  0.000921764172237851},
    {-0.004714530989129091,  0.003151948807627123},
    {-0.001055930168838909,  0.003228576712467020},
    {-0.004343270165991213, -0.011924332879354394},
    { 0.016499994418955999,  0.010255324919126899},
    {-0.021047239750251585,  0.002309419513135448},
    { 0.011855513874047341, -0.011604071033866310},
    {-0.000777842281358575,  0.005916341648175263},
    { 0.004380939277688377,  0.007397670455730446},
    {-0.021891594662401131, -0.008509480947490166},
    { 0.032787638290674201, -0.009950745850861956},
    {-0.021022579272463194,  0.030030850567389102},
    {-0.001508145650189953, -0.027571914870304640},
    { 0.004056649693022923,  0.004624901687718579},
    { 0.025728742586666287,  0.004824671348397606},
    {-0.058002700931665603,  0.030198618296813803},
    { 0.043631619628438784, -0.096308304333327280},
    { 0.033451363423624300,  0.136687079396426990},
    {-0.129387018420204200, -0.101540513046619400},
    { 0.172881344826560730, -0.000000000000005297},
    {-0.129387018420198010,  0.101540513046627330},
    { 0.033451363423615862, -0.136687079396429050},
    { 0.043631619628444723,  0.096308304333324601},
    {-0.058002700931667456, -0.030198618296810247},
    { 0.025728742586665992, -0.004824671348399184},
    { 0.004056649693022639, -0.004624901687718827},
    {-0.001508145650188251,  0.027571914870304734},
    {-0.021022579272465047, -0.030030850567387805},
    { 0.032787638290674812,  0.009950745850859947},
    {-0.021891594662400610,  0.008509480947491507},
    { 0.004380939277687923, -0.007397670455730714},
    {-0.000777842281358940, -0.005916341648175215},
    { 0.011855513874048058,  0.011604071033865578},
    {-0.021047239750251731, -0.002309419513134139},
    { 0.016499994418955360, -0.010255324919127926},
    {-0.004343270165990471,  0.011924332879354665},
    {-0.001055930168839110, -0.003228576712466955},
    {-0.004714530989129287, -0.003151948807626830},
    { 0.012092401380903103, -0.000921764172238603},
    {-0.010730008156911072,  0.009826454574016881},
    { 0.002079056046130817, -0.012568579063417559},
    { 0.003673858819547020,  0.006701685283451416},
    {-0.000902490398043478, -0.000385770160220647},
    {-0.005100500569859424,  0.001364751685737466},
    { 0.005692081512980187, -0.007582243186570198},
    { 0.000228879728553163,  0.010675998154712643},
    {-0.005599300279639117, -0.006828277067771524},
    { 0.004612116481180722,  0.001024468120657532},
    { 0.000280518918541900, -0.000134405998842571},
    {-0.002131333814462586,  0.004317129694157243},
    {-0.001560310257561563, -0.007437030759707604},
    { 0.006164252120862052,  0.005177351717450635},
    {-0.006240953957978898, -0.000207330368697911},
    { 0.002315022846573286, -0.001695671268241552},
    { 0.000273874932822152, -0.000977326273749050},
    { 0.001642959659015084,  0.003972384205230976},
    {-0.005338456415106324, -0.003008811999350072},
    { 0.006047866290490063, -0.000927406808800258},
    {-0.003025291044449980,  0.003226370992888153},
    { 0.000144278726929308, -0.001638049051599074},
    {-0.000744999556260777, -0.001143238699138063},
    { 0.003556824805628873,  0.001209822327859134},
    {-0.004645661091012323,  0.001630427298020484},
    { 0.002496092353182751, -0.003912508340989219},
    { 0.000302090333345882,  0.003088058972305475},
    {-0.000575340825070231, -0.000601820846099991},
    {-0.001471518558760183, -0.000211117948702046},
    { 0.002783459090201593, -0.001604420226187919},
    {-0.001462571137390710,  0.003635296917435769},
    {-0.000974502437588628, -0.003352512117661619},
    { 0.001737955094951189,  0.001247368808692742},
    {-0.000307792427984885,  0.000013203419520814},
    {-0.001109526585744628,  0.000950323796527789},
    { 0.000526319899588746, -0.002635084366837765},
    { 0.001389314639579712,  0.002746943712072799},
    {-0.002351020828600294, -0.001098649819278158},
    { 0.001403876768349682, -0.000326101441888477},
    { 0.000007636494885364, -0.000009498318627546},
    {-0.000015810020735412,  0.001342809547658261},
    {-0.001336084746214299, -0.001744394557524099},
    { 0.002306569133792808,  0.000593352416441460},
    {-0.001741577737284259,  0.000764423771425344},
    { 0.000446259382722843, -0.000833040920509266},
    {-0.000032439446797982, -0.000184988059956732},
    { 0.000872822027879478,  0.000783952720205515},
    {-0.001752019159639665, -0.000116536066154024},
    { 0.001497010004594416, -0.001021907858926351},
    {-0.000414412310798685,  0.001309793399193761},
    {-0.000211542240694677, -0.000563783548428934},
    {-0.000225464280571550, -0.000137131865995694},
    { 0.000974834882891133, -0.000116507082762092},
    {-0.000970457632383734,  0.000968411010101219},
    { 0.000163814255478569, -0.001346530693477844},
    { 0.000507024815168339,  0.000837598610490586},
    {-0.000349821460486328, -0.000132102793530797},
    {-0.000262675893448681,  0.000082499729563353},
    { 0.000447037274751782, -0.000651912509450940},
    { 0.000067236591919819,  0.001044125966364416},
    {-0.000666108629277537, -0.000744775901128932},
    { 0.000680260922139908,  0.000120771182888810},
    {-0.000201935458823935,  0.000107628631934352},
    {-0.000100626407015480,  0.000227947144491114},
    {-0.000151885493743030, -0.000595641190573172},
    { 0.000619888661818225,  0.000476871323359771},
    {-0.000726760198519770,  0.000007022279302861},
    { 0.000379089999045936, -0.000303466839685386},
    {-0.000032082305030256,  0.000136804226080666},
    { 0.000087462353623023,  0.000188197153014303},
    {-0.000416485880859098, -0.000211750352828883},
    { 0.000568731727879734, -0.000112347863435717},
    {-0.000345943017888307,  0.000402175417043329},
    { 0.000015664427565742, -0.000348002612845697},
    { 0.000054324657659007,  0.000076028700470034},
    { 0.000154951430569292,  0.000045395998708319},
    {-0.000325534912280742,  0.000130173041693986},
    { 0.000215876012859716, -0.000372695852521222},
    { 0.000054431163395054,  0.000385174790951269},
    {-0.000174999505027930, -0.000168008090089447},
    { 0.000030499908326113,  0.000003048682668941},
    { 0.000166817395492779, -0.000105930895534485},
    {-0.000131793335799479,  0.000373003580727555},
    {-0.000169437838021966, -0.000501610900725898},
    { 0.000488176200631435,  0.000319593757302892},
    {-0.000558465829929111,  0.000048001521408758},
    { 0.000349316846854170, -0.000326162940234938},
    {-0.000055467806072849,  0.000356692479491629},
    {-0.000115428390169126, -0.000205816198882806},
    { 0.000114833396071144,  0.000047778708840601},
    {-0.000038085228233508,  0.000010585909953741},
    {-0.000008324593371228,  0.000011315001355977},
    {-0.000001217597841650, -0.000039141482370942},
    { 0.000027694034878707,  0.000033114740542633},
    {-0.000034177222729439, -0.000007245841504979},
    { 0.000020060944485413, -0.000009851315045204},
    {-0.000005461290583903,  0.000011336784355656},
};

#define CHROMA_FIR_SIZE     (sizeof(CHROMA_FIR)/sizeof(dsp::complex_t))
#define CHROMA_FIR_DELAY    ((CHROMA_FIR_SIZE-1)/2)